package architect.design.patterns.behavior.command;

/**
 * 打开文件命令
 *
 * @author guanxin
 * @date 2018/5/6 13:20
 */

public class OpenFileCommand implements Command {

    private FileSystemReceiver fileSystem;

    public OpenFileCommand(FileSystemReceiver fs) {
        this.fileSystem = fs;
    }

    @Override
    public void execute() {
        // open command is forwarding request to openFile method
        this.fileSystem.openFile();
    }
}
